Spydus Help
Factsheets / Creating canned searches
In This Topic
    Creating canned searches
    In This Topic

    Search URLs can be created for use as hyperlinks in a static HTML page, for example to provide a list of DVDs held at a particular branch. As it is the search string which is saved, the results will always be up to date as the search is conducted from scratch every time. There are a number of elements that make up the search string. This factsheet aims to explain each of these elements and how they can be used. Once the first URL has been constructed and tested, it is an easy process to copy and modify that string (e.g. change location or collection). 

    The completed strings can then be used as a hyperlink in an HTML document. A link to this document can be added to the OPAC, for example in the side navigation frame. The searches discussed below are based on the options available in the Advanced Search screen.

    Building a URL with search items

    As a first example, we will look at building a URL which will conduct a title and author keyword search.

    The URL for a title keyword search for records on Australian Frogs by Michael Tyler is:

    http://localhost/cgi-bin/spydus.exe/ENQ/OPAC/BIBENQ?ENTRY1_NAME=AU&ENTRY1=Tyler+Michael&ENTRY1_TYPE=K&ENTRY1_OPER=%2BENTRY2_NAME=TI&ENTRY2=Australian+Frogs&ENTRY2_TYPE=K&NRECS=100&SORTS=HBT.SOVR&CF=GEN&SEARCH_FORM=%2Fcgi-bin%2Fspydus.exe%2FMSG%2FOPAC%2FCOMB.HTM&QRY=

    This URL is made up of a number of elements concatenated by "&".

    http://localhost/cgi-bin/spydus.exe/ENQ/OPAC/BIBENQ? URL of OPAC and enquiry parameters. Replace localhost with your server name.
    ENTRY1_NAME=AU

    First enquiry term type

    TI = Title

    AU = Author

    SU = Subject

    SE = Series title

    BS = Anywhere

    PU = Publisher

    NTS = General notes

    AB = Abstract

    JT = Periodical title Classification code 1 (see below)

    &ENTRY1=Tyler+Michael

    Text for search (use + in place of spaces)

    &ENTRY1_TYPE=K

     Search type K = keyword A = phrase E = exact match.

    &ENTRY1_OPER=%2B (for searches using more than one term) Four search terms can be used (ENTRY1 – ENTRY4). Between each pair of terms a Boolean operator is required, entered in the ASCII Hex equivalent: %2B = + (and) %2D = - (not) %2F = / (or)
    BENTRY2_NAME=TI&ENTRY2=Australian+Frogs&ENTRY2_TYPE=K Second enquiry term, type, text and search type as above
    &NRECS=100 Number of brief records per page
    &SORTS=HBT.SOVR

    Sort order for brief display 

    HBT.SOVR = Title

    DTE.DATE1.DESC%5DHBT.SOVR = Publication Date, latest to earliest

    DTE.DATE1%5DHBT.SOVR = Publication Date, earliest to latest

    SQL_AUTHOR_TITLE = Author by Title

    &CF=GEN Filter set. Collections which can be viewed in the OPAC have a filter set of GEN. Others filters may also be used such as PIC where this has been assigned to a pictorial collection.
    &SEARCH_FORM=%2Fcgi-bin%2Fspydus.exe%2FMSG%2FOPAC%2FCOMB.HTM&QRY= Returns the browser to the Quickfind page with an empty search filed when the new search icon is clicked

    Using publication date in the search

    The code for publication date is PD. For 'before' or 'after' searches use the ASCII Hex equivalent of < or >.

    3C = <

    3E = >

    For example:

    http://localhost/cgi-bin/spydus.exe/ENQ/OPAC/BIBENQ?PD=2006&NRECS=100&SORTS=HBT.SOVR&CF=GEN&SEARCH_FORM=%2Fcgi-bin%2Fspydus.exe%2FMSG%2FOPAC%2FCOMB.HTM&QRY=

    Year ranges are entered with a "-" between the years, for example:

    PD=2012-2014

    PD=%3C2014 (<2014)

    PD=%3E20014(>2014) 

    Collection and location searches

    The location and collection queries use the IRN for the search and a description for the display in the results window. The format used is a combination of Location IRN and Collection IRN followed by the Description (after an *) as one element of the search string. If Location is used to limit the search, then the syntax is:

    LOC=1234_%25*Centreville+Branch

    where 1234 is the Location IRN and %25 represents the % or SQL wild card character. The results page will have a heading Location: Centreville Branch.

    If Collection is used to limit the search, the syntax is:

    CLN=%25_5678*DVD

    where 5678 is the Collection IRN. The results page will have a heading Collection: Junior Fiction. It is possible to combine the Location and Collection in the one element of the search string, for example:

    LOC=1234_5678-Centreville+Branch

    However only one description can be entered so the results page will have the heading Location: Centreville Branch even if the set is limited to the records with items in the Junior Fiction collection. To display both descriptions in the heading, the syntax would be:

    LOC=1234_%25*Centreville+Branch& CLN=%25_5678*DVD

    which will give a heading Location:Centreville Branch and Collection DVD.

    The complete URL will be:

    http://localhost/cgi-bin/spydus.exe/ENQ/OPAC/BIBENQ? LOC=1234_%25*Centreville+Branch&CLN=%25_5678*DVD NRECS=100&SORTS=HBT.SOVR&CF=GEN& SEARCH_FORM=%2Fcgi-bin%2Fspydus.exe%2FMSG%2FOPAC%2FCOMB.HTM&QRY=

    Using BRN in a search

    You may want to create a hyperlink to a specific record (e.g. an image). The best way is to link to the BRN (rather than title, for example).

    The URL for this would be:

    http://localhost/cgi-bin/spydus.exe/ENQ/OPAC/BIBENQ?CF=PIC&BRN=9999

    CF=PIC assumes a separate collection filter is used for this collection, otherwise use CF=GEN.

    Class number searches

    DDC = Dewey class.

    CAL = LC class.

    MYC = Moys class.

    LXC = Local class.

    CNO = Call number.

    SBN = ISBN.

    SSN = ISSN.

    Notes

    If only a few results are expected (as may be the case where a title search is used) then the NRECS and SORTS won't be required.

    Use + for spaces.

    Use & (and) to join search criteria.

    '%' precedes an ASCII Hex code.

    2F = /

    5D = ]

    25 = % (SQL wild card)

    2B = +